<template>
	<view class="">
		<van-bar title="地址编辑 "></van-bar>
		<van-address-edit
		    :address-info="address"
		    :area-list="areaList" 
		    show-delete
		    :area-columns-placeholder="['请选择', '请选择', '请选择']" 
			@save="onSave"
		    @delete="onDelete" />

	</view>
</template>

<script>
	const Address = uniCloud.importObject("address")
	import { areaList } from '@vant/area-data';
	export default {
		setup() {
			return {
				areaList
			};
		},
		data(){
			return{
				address:{}
			}
		},
		onLoad(o){
			Address.get(o.id).then(res=>{
				this.address = res.data[0]
				this.address.addressDetail = this.address.detail
			})
		},
		methods:{
			onSave(){},
			onDelete(){},
		}
	};
</script>

<style>
</style>
